
import Request from './request'

const getLyric = (id) => {
  return Request.get(`/cloudmusic/lyric?id=${id}`)
}

const changeMusicSrc = async (id) => {
  let lyric = await null
  if (id) {
    await getLyric(id).then(res => {
      const { lrc } = res
      if (lrc && lrc.lyric) {
        lyric = lrc.lyric
      }
    })
    return { lyric };
  }
}


export { changeMusicSrc }